<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>isObject</title>
</head>

<body>
    <script>
        const isObject = obj => obj === Object(obj);
        const tasks = [
            { key: "isObject([1, 2, 3, 4])", value: isObject([1, 2, 3, 4]) }, // true
            { key: "isObject([])", value: isObject([]) }, // true
            { key: "isObject(['Hello!'])", value: isObject(['Hello!']) }, // true
            { key: "isObject({ a: 1 })", value: isObject({ a: 1 }) }, // true
            { key: "isObject({})", value: isObject({}) }, // true
            { key: "isObject(true)", value: isObject(true) }
        ] // false
        document.write(tasks.map(({ key, value }) => `<p>${key}的结果是:${value};</p>`).join(''))
    </script>
</body>

</html>